﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Core.Validation;
using MvcEngine.Core.Base;

namespace MvcEngine.Gallery.Models
{
    public class GalleryData : Entity
    {
        public Guid Id { get; set; }

        [LengthValidator("GalleryNameLengthValidator", 256)]
        [RequiredFieldValidator("GalleryNameRequiredValidator")]
        public string Name { get; set; }

        public Guid PageId { get; set; }

        public Guid? DefaultCategoryId
        {
            get { return this.GetValue<Guid?>("DefaultCategory", null); }
            set { Fields.SetValue("DefaultCategory", value); }
        }

        public int ImagesPerPage
        {
            get { return this.GetValue<int>("ImagesPerPage", 10); }
            set { Fields.SetValue("ImagesPerPage", value); }
        }

        public Guid? CreatedBy { get; set; }

        public DateTime CreatedDate { get; set; }

        public Guid? ModifiedBy { get; set; }

        public DateTime ModifiedDate { get; set; }

        public override string Xml { get; set; }
    }
}
